<?php
		session_start();
		require("inc/functions.php");
	 	require_once('inc/facebook.php');
	 	$facebook = new Facebook(array(
	 	'appId' => '266106703516634',
	 	'secret' => '57f64882d938b38d36f88185fc2fd78d'
		));
		
		$fbUser = $facebook->getUser();
		
		if(isset($_POST['login']))
			LoginUser($_POST);
	include("inc/views/header_view.php");
	include("inc/views/navbar_view.php");
?>

    <div class="container">
		<? if($fbUser): ?>
		<img src="http://graph.facebook.com/<?=$fbUser?>/picture" />
	 	<a href="<?=$facebook->getLogoutUrl()?>">Log Out</a>
	 	<? else: ?>
	 	<a href="<?=$facebook->getLoginUrl(array('scope' => 'read_stream, friends_likes'))?>">
	 	Log in with Facebook
		</a>
	<? endif; ?>
      <!-- Main hero unit for a primary marketing message or call to action -->

      <!-- Example row of columns -->
      <div class="row">
      	<div class="span6 offset3">        
        	<h1 style="text-align:center;">What is the project</h1>
            <p>
            	The Final project for my Web Server class is to use what we learned in class to create a functioning E-Commerce site. The site should include the use of 
                mysql databases, php, ajax, javascript, jquery, and the she sdk for both twitter and facebook. The Facebook sdk should allow you to log into the site with a facebook account. 				The twitter sdk should allow you to see what people are saying on tiwtter. The site should also allow you to purchase items using the authenticate.net test methods. 
            </p>
        
 			<h1 style="text-align:center;">Components</h1>
        	<p>The project at hand has the ability for you to log in with facebook, its only use is to show that it can be done. You have a twitter feed where the default search value is new paltz but you are able to customize your search by typing in the search bar. Products shows users a dynamically created products page, by clicking a link on the side you can see only the items in the category clicked. The sign up will have a user sign up as a typical customer, customers do not have many privleages however when logged in all users get a few additions to the navigation bar. If you log in as an employee you will have access to the admin area where you will be able to manipulate the database and possibly some parts of the site. The checkout is a simle checkout that unfortunalty does not correspond to your cart becase there is no cart.</p>
        
        	<h1 style="text-align:center;">Is It Complete?</h1>
        	<p>
            	The project at hand is not of a complete one. I was meant to do another project but when those plans fell through because of a lack of motivation of all members including myself we decided to do the normal e-commerce site. It was as much as I couldd scrounge up but the list of features that arent incorporated are as follows. The cart does not work and is not inplace therefore the authentication is at its barebones minimum. In the backend, or employee's section manipulating the database works but has no ajax. Since this is an older database I did not store an email for a user when they initally sign up but I did store them in a seperate Contact database. Since some users may not have emails and anyone that is to sign up now doesnt need to input one I made the quick decision just to have the sign in be the first and last name which is terrible but I needed something to work. Sorry for the inconvience.
            </p>
        </div>       
      </div>
      <script>
		$(function () {
		$('#myTab a:last').tab('show');
		})
		</script>
<?php
	include("inc/views/footer_view.php");
?>